//
//  AKRemoteNotificationHelper.h
//  96166打车
//
//  Created by guoshikeji_a on 2016/12/14.
//  Copyright © 2016年 SX. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef NSFoundationVersionNumber_iOS_9_x_Max
#import <UserNotifications/UserNotifications.h>
#endif

@interface AKRemoteNotificationHelper : NSObject

+ (NSString *)deviceToken;
+ (void)saveDeviceToken:(NSString *)token;
+ (void)requestPushNotificationAuthorization:(UIApplication *)application delegate:(id)delegate;

+(instancetype)shared;

/**
 *  本地推送
 *
 *  @param message  推送推送信息
 *  @param userInfo 推送信息详情
 *  @param delay    延时
 */
- (void)notificationWithMessage:(NSString *)message userInfo:(NSDictionary *)userInfo delay:(NSUInteger)delay;

/**
 *  本地推送
 *
 *  @param message   推送信息
 *  @param userInfo  推送信息详情
 *  @param soundName 提示声音，nil时为系统默认声音
 *  @param fireDate  推送时间
 */
- (void)notificationWithMessage:(NSString *)message
                       userInfo:(NSDictionary *)userInfo
                      soundName:(NSString *)soundName
                       fireDate:(NSDate *)fireDate;

- (void)notificationWithTitle:(NSString *)title
                      message:(NSString *)message
                     userInfo:(NSDictionary *)userInfo
                    soundName:(NSString *)soundName
                     fireDate:(NSDate *)fireDate;

/**
 *  取消本地推送
 *
 *  @param key   推送UserInfo中的key
 *  @param value 推送UserInfo中的key对应的value
 */
- (void)cancelLocalNotificationByUserInfoKey:(NSString *)key value:(id)value;

/**
 *  取消所有本地推送
 */
- (void)cancelAllLocalNotifications;

@end
